Integrand size = 31, antiderivative size = 99 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=-\frac {4 i c^3 (a+i a \tan (e+f x))^m}{f m}+\frac {4 i c^3 (a+i a \tan (e+f x))^{1+m}}{a f (1+m)}-\frac {i c^3 (a+i a \tan (e+f x))^{2+m}}{a^2 f (2+m)} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=-\frac {i c^3 (a+i a \tan (e+f x))^{m+2}}{a^2 f (m+2)}-\frac {4 i c^3 (a+i a \tan (e+f x))^m}{f m}+\frac {4 i c^3 (a+i a \tan (e+f x))^{m+1}}{a f (m+1)} \]
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \left (a^3 c^3\right ) \int \sec ^6(e+f x) (a+i a \tan (e+f x))^{-3+m} \, dx \\ & = -\frac {\left (i c^3\right ) \text {Subst}\left (\int (a-x)^2 (a+x)^{-1+m} \, dx,x,i a \tan (e+f x)\right )}{a^2 f} \\ & = -\frac {\left (i c^3\right ) \text {Subst}\left (\int \left (4 a^2 (a+x)^{-1+m}-4 a (a+x)^m+(a+x)^{1+m}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^2 f} \\ & = -\frac {4 i c^3 (a+i a \tan (e+f x))^m}{f m}+\frac {4 i c^3 (a+i a \tan (e+f x))^{1+m}}{a f (1+m)}-\frac {i c^3 (a+i a \tan (e+f x))^{2+m}}{a^2 f (2+m)} \\ \end{align*}
Time = 1.74 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.76 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=\frac {i c^3 (a+i a \tan (e+f x))^m \left (-8-5 m-m^2+2 i m (3+m) \tan (e+f x)+m (1+m) \tan ^2(e+f x)\right )}{f m (1+m) (2+m)} \]
[In]
[Out]
Time = 2.05 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.30
method | result | size |
derivativedivides | \(\frac {i c^{3} \left (\tan ^{2}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (2+m \right )}-\frac {2 c^{3} \left (3+m \right ) \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right ) \left (2+m \right )}-\frac {i c^{3} \left (m^{2}+5 m +8\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{\left (1+m \right ) f m \left (2+m \right )}\) | \(129\) |
default | \(\frac {i c^{3} \left (\tan ^{2}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (2+m \right )}-\frac {2 c^{3} \left (3+m \right ) \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right ) \left (2+m \right )}-\frac {i c^{3} \left (m^{2}+5 m +8\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{\left (1+m \right ) f m \left (2+m \right )}\) | \(129\) |
norman | \(\frac {i c^{3} \left (\tan ^{2}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (2+m \right )}-\frac {2 c^{3} \left (3+m \right ) \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right ) \left (2+m \right )}-\frac {i c^{3} \left (m^{2}+5 m +8\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{\left (1+m \right ) f m \left (2+m \right )}\) | \(129\) |
risch | \(\text {Expression too large to display}\) | \(2895\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.59 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=-\frac {4 \, {\left (i \, c^{3} m^{2} + 3 i \, c^{3} m + 2 i \, c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 i \, c^{3} + 2 \, {\left (i \, c^{3} m + 2 i \, c^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \left (\frac {2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m}}{f m^{3} + 3 \, f m^{2} + 2 \, f m + {\left (f m^{3} + 3 \, f m^{2} + 2 \, f m\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (f m^{3} + 3 \, f m^{2} + 2 \, f m\right )} e^{\left (2 i \, f x + 2 i \, e\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 979 vs. \(2 (80) = 160\).
Time = 0.81 (sec) , antiderivative size = 979, normalized size of antiderivative = 9.89 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=\int { {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{3} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=\int { {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{3} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
Time = 1.72 (sec) , antiderivative size = 229, normalized size of antiderivative = 2.31 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^3 \, dx=-\frac {2\,c^3\,{\left (\frac {a\,\left (\cos \left (2\,e+2\,f\,x\right )+1+\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,e+2\,f\,x\right )+1}\right )}^m\,\left (m\,7{}\mathrm {i}+\cos \left (2\,e+2\,f\,x\right )\,16{}\mathrm {i}+\cos \left (4\,e+4\,f\,x\right )\,4{}\mathrm {i}+2\,m^2\,\sin \left (2\,e+2\,f\,x\right )+m^2\,\sin \left (4\,e+4\,f\,x\right )+m\,\cos \left (2\,e+2\,f\,x\right )\,10{}\mathrm {i}+m\,\cos \left (4\,e+4\,f\,x\right )\,3{}\mathrm {i}+6\,m\,\sin \left (2\,e+2\,f\,x\right )+3\,m\,\sin \left (4\,e+4\,f\,x\right )+m^2\,1{}\mathrm {i}+m^2\,\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}+m^2\,\cos \left (4\,e+4\,f\,x\right )\,1{}\mathrm {i}+12{}\mathrm {i}\right )}{f\,m\,\left (4\,\cos \left (2\,e+2\,f\,x\right )+\cos \left (4\,e+4\,f\,x\right )+3\right )\,\left (m^2+3\,m+2\right )} \]
[In]
[Out]